﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Userfrm.aspx.cs" Inherits="BasePages_AccreditPage_Userfrm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <LINK href="../../CSS/hfmenu.css" type="text/css" rel="stylesheet">
    <script language=javascript>

			function chooseValid()
			{		 
			  var result="";
			  if (document.all.gvUsers==null||document.all.gvUsers.rows==null)
			  {
			   alert('请选择用户！');
				   return;
			  }
		      for( i=0;i<document.all.gvUsers.rows.length;i++)
              {
                 var cb=document.all.gvUsers.rows(i).cells(0).children(0);
                 if(cb.checked)
                 {
                   str=document.all.gvUsers.rows(i).cells(0).innerText;
                   result=result+str+","; 
                 }
              }
              if (result=="")
				{
				   alert('请选择用户！');
				   return;
				}
				returnValue=result.substr(0,result.length-1);
				window.close();
			
			}	

		</script>

</head>
<body>
    <form id="form1" runat="server">
        <table border=1 style="width:100%">
            <tr>
                <td colspan="3" style="height: 14px">
                    请选择用户:</td>
            </tr>
            <tr>
                <td colspan="3"  valign="top">
    <asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="False" ShowHeader="False" Width="100%" >
                            <Columns>
                                <asp:TemplateField HeaderText="帐号">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("UserId") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="CheckBox1" runat="server" Text='<%# Bind("UserId") %>'/>

                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="UserName" HeaderText="姓名" />
                            </Columns>
        <HeaderStyle HorizontalAlign="Left" />
                        </asp:GridView>
                </td>
            </tr>
            <tr>
                <td colspan="3" style="height: 13px">
            &nbsp;按用户名:
                    <asp:TextBox ID="tbxUserName"
                            runat="server" Width="188px"></asp:TextBox><asp:Button ID="search" runat="server"
                                OnClick="search_Click" Text="查询" /></td>
            </tr>
            <tr>
                <td colspan="3" style="height: 13px">
    <input onclick="chooseValid()" type="button" value="确定" id="Button3" />
                    <input onclick="javaScript:window.close();"
                                type="button" value="取消" id="Button4" /></td>
            </tr>
        </table>


    </form>
</body>
</html>
